<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			var stu = [{
					name: '张三',
					gender: '男',
					age: 20
				},
				{
					name: '王小毛',
					gender: '男',
					age: 20
				},
				{
					name: '李四',
					gender: '男',
					age: 20
				}
			]
			let index=stu.findIndex((e)=>{return e.name=='李四'}
			)
			
			
		
			console.log(index)
		</script>
	</body>
</html>
